#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>

#define m 10

	static int mypow(int x,int n)
{
	if(n == 0)
		return 1;
	return x*mypow(x,n-1);
}



	int main()
{
	char a[m] = "DF5";
	int b[m] = {0};
	int k = 0;
	int t;
	int i,j = 0;

	int len = strlen(a);

	for(i = 0;i < len;i++ )
	{
		if(a[i] >= '0' && a[i] <= '9')
			b[k++] = a[i] - '0';
		else if(a[i] > 9)
			b[k++] = a[i] + 10 - 'A';
	}
	for(i = 0,t = k-1;i < k;i++,t--)
	{
		j += b[i]*mypow(16,t);
	}
	printf("%d\n",j);
    printf("Hello");	
	exit(0);
}
